#ifndef H_NET_20071013
#define H_NET_20071013

#include "types.h"

int Send (int sock, const char buffer[BUFFERSIZE]);
char * gethost (struct sockaddr_in ss);
int serv_socket_create (int , int , struct sockaddr_in*);
#ifdef USE_SSL
int serv_socket_ssl_create (int domain, int type, struct sockaddr_in* sin);
#endif
int SendToClient (Client* client, const char *format, ...);
int RecvFromUser(int Socket, char* buffer, int size);

struct sockaddr_in* NetInit (int, unsigned int);

void SendToChan (Channel* Channel, const char *format, ...);
void CloseSocket (SecSockets *sock);
void process_message (Client *me,  Message msg);
void UpdateMaxFD (Thread* thread);
void KillClient (const char* user, const char *reason);

#endif
